package com.chinacoal.microservice.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.chinacoal.microservice.pojo.CcmsSmartleasingBasicdata;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 基础数据维护-mybatis-plus接口类
 * @date 2020-11-30 20：16
 */
public interface CcmsSmartleasingBasicdataMapper extends BaseMapper<CcmsSmartleasingBasicdata> {

    /**
     * @Description: 查询所有一级信息
     * @author zhuliang
     * @date 2020/11/30 20:33
     */
    List<CcmsSmartleasingBasicdata> getAllByOneId(@Param("categoryNumber") String categoryNumber,
                                                  @Param("pkBasicdataId") String pkBasicdataId);

    /**
     * @Description: 根据二级id查询一级信息
     * @author zhuliang
     * @date 2021/1/12 17:35
     */
    List<CcmsSmartleasingBasicdata> getTwoByOne(@Param("categoryNumber") String categoryNumber,
                                                @Param("pkBasicdataId") String pkBasicdataId);

    /**
     * @Description: 根据一的关联id查询二级信息
     * @author zhuliang
     * @date 2020/11/30 20:33
     */
    List<CcmsSmartleasingBasicdata> getAllByTwoId(@Param("id") String id,
                                                  @Param("pkBasicdataId") String pkBasicdataId);

    /**
     * @Description: 查询所有的二级信息
     * @author zhuliang
     * @date 2020/11/30 21:36
     */
    List<CcmsSmartleasingBasicdata> getTwoAll(@Param("categoryNumber") String categoryNumber,
                                              @Param("parentItemId") String parentItemId,
                                              @Param("pkBasicdataId") String pkBasicdataId);

    /**
     * @Description: 根据设备类型查询设备型号
     * @author zhuliang
     * @date 2021/1/11 11:49
     */
    String queryDeviceModel(@Param("id") String id,
                            @Param("itemName") String itemName);

    /**
     * @Description: 查询权限类型
     * @author zhuliang
     * @date 2021/1/12 15:39
     */
    String getPermissionType(@Param("pkBasicdataId") String pkBasicdataId);
}
